import Vue from 'vue'
import Router from 'vue-router'
import Main from '@/components/page/Main'
import Login from '@/components/page/Login'
import RulesMgtPage from '@/components/page/RulesMgtPage'
import AccountMgtPage from '@/components/page/AccountMgtPage'
import TestPage from '@/components/page/TestPage'
Vue.use(Router)

const router = new Router({
  saveScrollPosition: true,
  history: true,
  routes: [
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path: '/',
      name: 'main',
      component: Main,
      children: [
        {
          path: 'rulesMgtPage',
          name: 'rulesMgtPage',
          component: RulesMgtPage
        },
        {
          path: 'accountMgtPage',
          name: 'accountMgtPage',
          component: AccountMgtPage
        },
        {
          path: 'test',
          name: 'testPage',
          component: TestPage
        }
      ]
    }
  ]
})
export default router;
